______________________________________________________________________

 Zelda Decompression/Recompression Program (SNES)
 June 25, 2017
 Version 1.20

 FuSoYa's Niche
 http://fusoya.eludevisibility.org
______________________________________________________________________

 CONTENTS
______________________________________________________________________

 1. Credits
 2. Instructions
 3. What's New
 4. Legal Notice
 5. Contact Information

______________________________________________________________________

 1. Credits
______________________________________________________________________


 PROGRAMMING:           FuSoYa (Defender of Relm)

 THE USUAL SUSPECTS:    ZSNES debugger, Jeremy Gordon's 65816
                        assembler, SNES Professional ASM kit,
                        SNES9X tracer feature, Naga,
                        Borland's C++ 5.02 package.

______________________________________________________________________

 2. Instructions
______________________________________________________________________

 This is a graphics decompression/recompression program for Zelda: A
 Link to the Past (US or Japanese version).  It's based on Lunar
 Magic's compression source code for Super Mario World.  The formats
 were almost identical, so after some nagging I finally put this
 program together.

 For decompression, the command line options are:
    zcompress 0 ROMFileName [FileToSaveAs]

 For recompression, the command line options are:
    zcompress 1 PCHexAddressToInsert ROMFileName [FileToInsert]

 To expand the ROM to 2 megs, use:
    zcompress 2 ROMFileName

 To expand the ROM to 3 megs, use:
    zcompress 3 ROMFileName

 Examples of valid command line arguments:
    zcompress 0 zelda.smc AllGFX.bin
    zcompress 0 zelda.smc
    zcompress 1 87200 zelda.smc AllGFX.bin
    zcompress 1 87200 zelda.smc
    zcompress 2 zelda.smc
    zcompress 3 zelda.smc

 The last file name is optional in the first 2 cases...if you don't
 include it, the program will assume you want to deal with split
 files of all the graphics instead of a single file.  Considering
 that means you'd have about 223 separate files, you probably won't
 want to do this.

 When decompressing the ROM data, the program will also extract the
 non-compressed graphics for convenience.  All 3bpp graphics are
 converted to 4bpp graphics...3bpp converted graphics make up the 
 majority of Zelda's gfx, so it's important to remember not to use
 the last 4 colors of the palette, since the upper bitplane will be
 lost on reinsertion to the ROM.  The only true 4bpp tiles are the
 last non-compressed gfx of Link at the end of the extracted file. 
 There are a few other segments in the file that use 2bpp tiles, but
 they're rare.

 When reinserting, I highly recommend using address 0x87200 (0x87000 
 for non-headered ROMs) since that's the address of the original gfx.
 The program recompresses the data slightly better than Nintendo did,
 so you should be fairly safe as far as room goes.  However, if the
 program detects that inserting any further will go past 0xC4200 
 (0xC4000 non-headered), it will abort in mid-operation and notify
 you that the ROM needs to be expanded and that the graphics must be
 reinserted into the expanded portion.  The expanded area would be
 any address at or above 0x100200 (0x100000 non-headered).

 When the non-compressed non-3bpp graphics are reinserted, they are
 placed at their original positions regardless of the address you
 choose to insert at, since the pointers for them aren't included in
 the main graphics pointer table (although admittedly there wouldn't
 be much point in moving those two segments anyway).

 The program supports ROMs with or without a copier header.  It can
 also auto-correct the address to insert if you're using a headered
 address for a non-headered ROM or vice versa, but it will only do
 this for the original address of the graphics and for the starting
 address of the expanded ROM.

 Have fun! ^^


______________________________________________________________________

 3. What's New
______________________________________________________________________

Version 1.20 June 25, 2017

-added support for the Japanese version of the ROM.


Version 1.10 December 25, 2015

-added 64 bit build of the program, which you can find in the
 x64 folder.
-added support for ROMs without a copier header.


Version 1.00 October 25, 2000

-First Release.


______________________________________________________________________

 4. Legal Notice
______________________________________________________________________

 The Zelda decompression/recompression program (hereafter referred
 to as the "Software") is not official or supported by Nintendo or any
 other commercial entity.

 The Software is freeware thus it can be distributed freely provided
 the following conditions hold:(1) This document is supplied with the
 Software and both the document and Software are not modified in any
 way (2) The Software is not distributed with or as part of any ROM
 image in any format, and (3) No goods, services, or money can be
 charged for the Software in any form, nor may it be included in
 conjunction with any other offer or monetary exchange.

 The Software is provided AS IS, and its use is at your own risk.
 Anyone mentioned in this document will not be held liable for any
 damages, direct or otherwise, arising from its use or presence.
 

______________________________________________________________________

 5. Contact Information
______________________________________________________________________

 FuSoYa
   www:   http://fusoya.eludevisibility.org
   ???:   06942508

______________________________________________________________________
